<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

</body>
<script>
    function each(arr,callback){
        for(var i=0;i<arr.length;i++){
            callback(i,arr[i]);
        }
    }
    var array = [31321,321,321,321,5,13,21,51,32];
    each(array,function(i,v){
        console.log(i + '===========' + v);
    })

    //
</script>
</html>